import { createApp } from 'vue'
import App from './App.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './styles/index.scss'

import { createPinia } from 'pinia'
import router from './router'
import '@/permission'
import { auth } from './directive'

const app = createApp(App)
app.use(createPinia())

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router)
app.directive('auth-btn', auth)

app.mount('#app')
